package cn.sjxy.ssm.dao;
import java.util.List;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import cn.sjxy.ssm.domain.Department;
@Repository
@Mapper
public interface DepartmentMapper {
    /*功能：保存一个部门的信息*/
	@Insert("insert into tb_dept(id,name) values(#{id},#{name})")
	public void save(Department dept);
	/*功能：通过部门编号来查询一个部门的信息*/
	@Select("select * from tb_dept where id=#{id}")
	public Department findById(String id);
	/*功能：查询所有的部门信息*/
	@Select("select * from tb_dept ")
	public List<Department> findAll();
	
}
